package itheima;

import java.time.ZoneId;
import java.time.ZonedDateTime;

public class ZongIdTest {
    public static void main(String[] args) {
        ZoneId zongId = ZoneId.systemDefault();
        System.out.println("系统默认时区"+zongId);

        ZoneId.getAvailableZoneIds().forEach(System.out::println);

        ZoneId zoneId1= ZoneId.of("America/New_York");

        ZonedDateTime zdt=ZonedDateTime.now(zoneId1);
        System.out.println("美国时间"+zdt);
        System.out.println("中国时间"+ZonedDateTime.now(ZoneId.systemDefault()));

    }
}
